package org.lee.visitor.app.user.impl;

import org.lee.visitor.app.user.Grade;
import org.lee.visitor.app.user.Identity;
import org.lee.visitor.app.user.User;
import org.lee.visitor.app.visitor.Visitor;

/**
 * Student
 * 学生
 *
 * @author dralee
 * @date 2021-11-24 14:14:30
 **/
public class Student extends User {

    public Student(String name, Identity identity, Grade grade, int classNo) {
        super(name, identity, grade, classNo);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    /**
     * 排名
     *
     * @return
     */
    public int ranking() {
        return (int) (Math.random() * 100);
    }
}
